import {Injectable} from "@nestjs/common";
import {Cron, CronExpression} from '@nestjs/schedule';
import ILogger from "@/services/logger.service";
import { defer, from, map } from "rxjs";
import axios from "axios";
import IGlobal from "@/services/global.service";

@Injectable()
export class ScheduleService {
  @Cron(CronExpression.EVERY_3_HOURS)
  exampleHandler() {
    ILogger.info(`exampleHandler triggered.`)
  }

  @Cron(CronExpression.EVERY_MINUTE)
  bindTaskCheckHandler() {
    // axios.get(`${IGlobal.appUrl}/clash/fetch_config`)
  }
}